package day06_OOP.demo10_String;
//字符串的切分split(String regex)
//转义符
public class Demo02 {
    public static void main(String[] args) {
        String str="床前明月光,疑似地上霜,举头望明月,低头思故乡";
        String [] split=str.split(",");
        for (int i = 0; i <split.length ; i++) {
            System.out.println(split[i]);
        }
        //转义符\：更改含义(只能更改转义符之后第一个的含义)
        System.out.println("HelloWorld");
        System.out.println("HellonWorld");
        System.out.println("Hello\nWorld");
        System.out.println("Hello\\nWorld");
    }
}
